#pragma once
// MESSAGE FPV_DEBUG PACKING

#define MAVLINK_MSG_ID_FPV_DEBUG 209


typedef struct __mavlink_fpv_debug_t {
 uint64_t time_unix_usec; /*< [us] Timestamp (microseconds, UNIX epoch).*/
 float g_body_rate_x; /*< [rad/s] Gimbal body angular rate X.*/
 float g_body_rate_y; /*< [rad/s] Gimbal body angular rate Y.*/
 float g_body_rate_z; /*< [rad/s] Gimbal body angular rate Z.*/
 float g_frame_angles_312_x; /*< [rad] Gimbal frame angle X (312 Euler).*/
 float g_frame_angles_312_y; /*< [rad] Gimbal frame angle Y (312 Euler).*/
 float g_frame_angles_312_z; /*< [rad] Gimbal frame angle Z (312 Euler).*/
 float g_euler_angles_321_x; /*< [rad] Inertial Euler angle X (321 Euler).*/
 float g_euler_angles_321_y; /*< [rad] Inertial Euler angle Y (321 Euler).*/
 float g_euler_angles_321_z; /*< [rad] Inertial Euler angle Z (321 Euler).*/
 float g_euler_rates_x; /*< [rad/s] Inertial Euler angular rate X.*/
 float g_euler_rates_y; /*< [rad/s] Inertial Euler angular rate Y.*/
 float g_euler_rates_z; /*< [rad/s] Inertial Euler angular rate Z.*/
 float reserve_float_1; /*<  Reserved float field 1.*/
 float reserve_float_2; /*<  Reserved float field 2.*/
 float reserve_float_3; /*<  Reserved float field 3.*/
 float reserve_float_4; /*<  Reserved float field 4.*/
 float reserve_float_5; /*<  Reserved float field 5.*/
 uint16_t frame_id; /*<  Frame ID (incremental counter for packet loss detection).*/
 int8_t reserve_int8_1; /*<  Reserved int8 field 1.*/
 int8_t reserve_int8_2; /*<  Reserved int8 field 2.*/
 int8_t reserve_int8_3; /*<  Reserved int8 field 3.*/
 int8_t reserve_int8_4; /*<  Reserved int8 field 4.*/
 int8_t reserve_int8_5; /*<  Reserved int8 field 5.*/
} mavlink_fpv_debug_t;

#define MAVLINK_MSG_ID_FPV_DEBUG_LEN 83
#define MAVLINK_MSG_ID_FPV_DEBUG_MIN_LEN 83
#define MAVLINK_MSG_ID_209_LEN 83
#define MAVLINK_MSG_ID_209_MIN_LEN 83

#define MAVLINK_MSG_ID_FPV_DEBUG_CRC 171
#define MAVLINK_MSG_ID_209_CRC 171



#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_FPV_DEBUG { \
    209, \
    "FPV_DEBUG", \
    24, \
    {  { "time_unix_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_fpv_debug_t, time_unix_usec) }, \
         { "frame_id", NULL, MAVLINK_TYPE_UINT16_T, 0, 76, offsetof(mavlink_fpv_debug_t, frame_id) }, \
         { "g_body_rate_x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_fpv_debug_t, g_body_rate_x) }, \
         { "g_body_rate_y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_fpv_debug_t, g_body_rate_y) }, \
         { "g_body_rate_z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_fpv_debug_t, g_body_rate_z) }, \
         { "g_frame_angles_312_x", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_fpv_debug_t, g_frame_angles_312_x) }, \
         { "g_frame_angles_312_y", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_fpv_debug_t, g_frame_angles_312_y) }, \
         { "g_frame_angles_312_z", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_fpv_debug_t, g_frame_angles_312_z) }, \
         { "g_euler_angles_321_x", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_fpv_debug_t, g_euler_angles_321_x) }, \
         { "g_euler_angles_321_y", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_fpv_debug_t, g_euler_angles_321_y) }, \
         { "g_euler_angles_321_z", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_fpv_debug_t, g_euler_angles_321_z) }, \
         { "g_euler_rates_x", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_fpv_debug_t, g_euler_rates_x) }, \
         { "g_euler_rates_y", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_fpv_debug_t, g_euler_rates_y) }, \
         { "g_euler_rates_z", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_fpv_debug_t, g_euler_rates_z) }, \
         { "reserve_int8_1", NULL, MAVLINK_TYPE_INT8_T, 0, 78, offsetof(mavlink_fpv_debug_t, reserve_int8_1) }, \
         { "reserve_int8_2", NULL, MAVLINK_TYPE_INT8_T, 0, 79, offsetof(mavlink_fpv_debug_t, reserve_int8_2) }, \
         { "reserve_int8_3", NULL, MAVLINK_TYPE_INT8_T, 0, 80, offsetof(mavlink_fpv_debug_t, reserve_int8_3) }, \
         { "reserve_int8_4", NULL, MAVLINK_TYPE_INT8_T, 0, 81, offsetof(mavlink_fpv_debug_t, reserve_int8_4) }, \
         { "reserve_int8_5", NULL, MAVLINK_TYPE_INT8_T, 0, 82, offsetof(mavlink_fpv_debug_t, reserve_int8_5) }, \
         { "reserve_float_1", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_fpv_debug_t, reserve_float_1) }, \
         { "reserve_float_2", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_fpv_debug_t, reserve_float_2) }, \
         { "reserve_float_3", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_fpv_debug_t, reserve_float_3) }, \
         { "reserve_float_4", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_fpv_debug_t, reserve_float_4) }, \
         { "reserve_float_5", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_fpv_debug_t, reserve_float_5) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_FPV_DEBUG { \
    "FPV_DEBUG", \
    24, \
    {  { "time_unix_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_fpv_debug_t, time_unix_usec) }, \
         { "frame_id", NULL, MAVLINK_TYPE_UINT16_T, 0, 76, offsetof(mavlink_fpv_debug_t, frame_id) }, \
         { "g_body_rate_x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_fpv_debug_t, g_body_rate_x) }, \
         { "g_body_rate_y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_fpv_debug_t, g_body_rate_y) }, \
         { "g_body_rate_z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_fpv_debug_t, g_body_rate_z) }, \
         { "g_frame_angles_312_x", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_fpv_debug_t, g_frame_angles_312_x) }, \
         { "g_frame_angles_312_y", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_fpv_debug_t, g_frame_angles_312_y) }, \
         { "g_frame_angles_312_z", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_fpv_debug_t, g_frame_angles_312_z) }, \
         { "g_euler_angles_321_x", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_fpv_debug_t, g_euler_angles_321_x) }, \
         { "g_euler_angles_321_y", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_fpv_debug_t, g_euler_angles_321_y) }, \
         { "g_euler_angles_321_z", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_fpv_debug_t, g_euler_angles_321_z) }, \
         { "g_euler_rates_x", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_fpv_debug_t, g_euler_rates_x) }, \
         { "g_euler_rates_y", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_fpv_debug_t, g_euler_rates_y) }, \
         { "g_euler_rates_z", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_fpv_debug_t, g_euler_rates_z) }, \
         { "reserve_int8_1", NULL, MAVLINK_TYPE_INT8_T, 0, 78, offsetof(mavlink_fpv_debug_t, reserve_int8_1) }, \
         { "reserve_int8_2", NULL, MAVLINK_TYPE_INT8_T, 0, 79, offsetof(mavlink_fpv_debug_t, reserve_int8_2) }, \
         { "reserve_int8_3", NULL, MAVLINK_TYPE_INT8_T, 0, 80, offsetof(mavlink_fpv_debug_t, reserve_int8_3) }, \
         { "reserve_int8_4", NULL, MAVLINK_TYPE_INT8_T, 0, 81, offsetof(mavlink_fpv_debug_t, reserve_int8_4) }, \
         { "reserve_int8_5", NULL, MAVLINK_TYPE_INT8_T, 0, 82, offsetof(mavlink_fpv_debug_t, reserve_int8_5) }, \
         { "reserve_float_1", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_fpv_debug_t, reserve_float_1) }, \
         { "reserve_float_2", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_fpv_debug_t, reserve_float_2) }, \
         { "reserve_float_3", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_fpv_debug_t, reserve_float_3) }, \
         { "reserve_float_4", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_fpv_debug_t, reserve_float_4) }, \
         { "reserve_float_5", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_fpv_debug_t, reserve_float_5) }, \
         } \
}
#endif

/**
 * @brief Pack a fpv_debug message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_unix_usec [us] Timestamp (microseconds, UNIX epoch).
 * @param frame_id  Frame ID (incremental counter for packet loss detection).
 * @param g_body_rate_x [rad/s] Gimbal body angular rate X.
 * @param g_body_rate_y [rad/s] Gimbal body angular rate Y.
 * @param g_body_rate_z [rad/s] Gimbal body angular rate Z.
 * @param g_frame_angles_312_x [rad] Gimbal frame angle X (312 Euler).
 * @param g_frame_angles_312_y [rad] Gimbal frame angle Y (312 Euler).
 * @param g_frame_angles_312_z [rad] Gimbal frame angle Z (312 Euler).
 * @param g_euler_angles_321_x [rad] Inertial Euler angle X (321 Euler).
 * @param g_euler_angles_321_y [rad] Inertial Euler angle Y (321 Euler).
 * @param g_euler_angles_321_z [rad] Inertial Euler angle Z (321 Euler).
 * @param g_euler_rates_x [rad/s] Inertial Euler angular rate X.
 * @param g_euler_rates_y [rad/s] Inertial Euler angular rate Y.
 * @param g_euler_rates_z [rad/s] Inertial Euler angular rate Z.
 * @param reserve_int8_1  Reserved int8 field 1.
 * @param reserve_int8_2  Reserved int8 field 2.
 * @param reserve_int8_3  Reserved int8 field 3.
 * @param reserve_int8_4  Reserved int8 field 4.
 * @param reserve_int8_5  Reserved int8 field 5.
 * @param reserve_float_1  Reserved float field 1.
 * @param reserve_float_2  Reserved float field 2.
 * @param reserve_float_3  Reserved float field 3.
 * @param reserve_float_4  Reserved float field 4.
 * @param reserve_float_5  Reserved float field 5.
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_fpv_debug_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint64_t time_unix_usec, uint16_t frame_id, float g_body_rate_x, float g_body_rate_y, float g_body_rate_z, float g_frame_angles_312_x, float g_frame_angles_312_y, float g_frame_angles_312_z, float g_euler_angles_321_x, float g_euler_angles_321_y, float g_euler_angles_321_z, float g_euler_rates_x, float g_euler_rates_y, float g_euler_rates_z, int8_t reserve_int8_1, int8_t reserve_int8_2, int8_t reserve_int8_3, int8_t reserve_int8_4, int8_t reserve_int8_5, float reserve_float_1, float reserve_float_2, float reserve_float_3, float reserve_float_4, float reserve_float_5)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_FPV_DEBUG_LEN];
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_float(buf, 8, g_body_rate_x);
    _mav_put_float(buf, 12, g_body_rate_y);
    _mav_put_float(buf, 16, g_body_rate_z);
    _mav_put_float(buf, 20, g_frame_angles_312_x);
    _mav_put_float(buf, 24, g_frame_angles_312_y);
    _mav_put_float(buf, 28, g_frame_angles_312_z);
    _mav_put_float(buf, 32, g_euler_angles_321_x);
    _mav_put_float(buf, 36, g_euler_angles_321_y);
    _mav_put_float(buf, 40, g_euler_angles_321_z);
    _mav_put_float(buf, 44, g_euler_rates_x);
    _mav_put_float(buf, 48, g_euler_rates_y);
    _mav_put_float(buf, 52, g_euler_rates_z);
    _mav_put_float(buf, 56, reserve_float_1);
    _mav_put_float(buf, 60, reserve_float_2);
    _mav_put_float(buf, 64, reserve_float_3);
    _mav_put_float(buf, 68, reserve_float_4);
    _mav_put_float(buf, 72, reserve_float_5);
    _mav_put_uint16_t(buf, 76, frame_id);
    _mav_put_int8_t(buf, 78, reserve_int8_1);
    _mav_put_int8_t(buf, 79, reserve_int8_2);
    _mav_put_int8_t(buf, 80, reserve_int8_3);
    _mav_put_int8_t(buf, 81, reserve_int8_4);
    _mav_put_int8_t(buf, 82, reserve_int8_5);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FPV_DEBUG_LEN);
#else
    mavlink_fpv_debug_t packet;
    packet.time_unix_usec = time_unix_usec;
    packet.g_body_rate_x = g_body_rate_x;
    packet.g_body_rate_y = g_body_rate_y;
    packet.g_body_rate_z = g_body_rate_z;
    packet.g_frame_angles_312_x = g_frame_angles_312_x;
    packet.g_frame_angles_312_y = g_frame_angles_312_y;
    packet.g_frame_angles_312_z = g_frame_angles_312_z;
    packet.g_euler_angles_321_x = g_euler_angles_321_x;
    packet.g_euler_angles_321_y = g_euler_angles_321_y;
    packet.g_euler_angles_321_z = g_euler_angles_321_z;
    packet.g_euler_rates_x = g_euler_rates_x;
    packet.g_euler_rates_y = g_euler_rates_y;
    packet.g_euler_rates_z = g_euler_rates_z;
    packet.reserve_float_1 = reserve_float_1;
    packet.reserve_float_2 = reserve_float_2;
    packet.reserve_float_3 = reserve_float_3;
    packet.reserve_float_4 = reserve_float_4;
    packet.reserve_float_5 = reserve_float_5;
    packet.frame_id = frame_id;
    packet.reserve_int8_1 = reserve_int8_1;
    packet.reserve_int8_2 = reserve_int8_2;
    packet.reserve_int8_3 = reserve_int8_3;
    packet.reserve_int8_4 = reserve_int8_4;
    packet.reserve_int8_5 = reserve_int8_5;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FPV_DEBUG_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_FPV_DEBUG;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FPV_DEBUG_MIN_LEN, MAVLINK_MSG_ID_FPV_DEBUG_LEN, MAVLINK_MSG_ID_FPV_DEBUG_CRC);
}

/**
 * @brief Pack a fpv_debug message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param status MAVLink status structure
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_unix_usec [us] Timestamp (microseconds, UNIX epoch).
 * @param frame_id  Frame ID (incremental counter for packet loss detection).
 * @param g_body_rate_x [rad/s] Gimbal body angular rate X.
 * @param g_body_rate_y [rad/s] Gimbal body angular rate Y.
 * @param g_body_rate_z [rad/s] Gimbal body angular rate Z.
 * @param g_frame_angles_312_x [rad] Gimbal frame angle X (312 Euler).
 * @param g_frame_angles_312_y [rad] Gimbal frame angle Y (312 Euler).
 * @param g_frame_angles_312_z [rad] Gimbal frame angle Z (312 Euler).
 * @param g_euler_angles_321_x [rad] Inertial Euler angle X (321 Euler).
 * @param g_euler_angles_321_y [rad] Inertial Euler angle Y (321 Euler).
 * @param g_euler_angles_321_z [rad] Inertial Euler angle Z (321 Euler).
 * @param g_euler_rates_x [rad/s] Inertial Euler angular rate X.
 * @param g_euler_rates_y [rad/s] Inertial Euler angular rate Y.
 * @param g_euler_rates_z [rad/s] Inertial Euler angular rate Z.
 * @param reserve_int8_1  Reserved int8 field 1.
 * @param reserve_int8_2  Reserved int8 field 2.
 * @param reserve_int8_3  Reserved int8 field 3.
 * @param reserve_int8_4  Reserved int8 field 4.
 * @param reserve_int8_5  Reserved int8 field 5.
 * @param reserve_float_1  Reserved float field 1.
 * @param reserve_float_2  Reserved float field 2.
 * @param reserve_float_3  Reserved float field 3.
 * @param reserve_float_4  Reserved float field 4.
 * @param reserve_float_5  Reserved float field 5.
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_fpv_debug_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
                               uint64_t time_unix_usec, uint16_t frame_id, float g_body_rate_x, float g_body_rate_y, float g_body_rate_z, float g_frame_angles_312_x, float g_frame_angles_312_y, float g_frame_angles_312_z, float g_euler_angles_321_x, float g_euler_angles_321_y, float g_euler_angles_321_z, float g_euler_rates_x, float g_euler_rates_y, float g_euler_rates_z, int8_t reserve_int8_1, int8_t reserve_int8_2, int8_t reserve_int8_3, int8_t reserve_int8_4, int8_t reserve_int8_5, float reserve_float_1, float reserve_float_2, float reserve_float_3, float reserve_float_4, float reserve_float_5)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_FPV_DEBUG_LEN];
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_float(buf, 8, g_body_rate_x);
    _mav_put_float(buf, 12, g_body_rate_y);
    _mav_put_float(buf, 16, g_body_rate_z);
    _mav_put_float(buf, 20, g_frame_angles_312_x);
    _mav_put_float(buf, 24, g_frame_angles_312_y);
    _mav_put_float(buf, 28, g_frame_angles_312_z);
    _mav_put_float(buf, 32, g_euler_angles_321_x);
    _mav_put_float(buf, 36, g_euler_angles_321_y);
    _mav_put_float(buf, 40, g_euler_angles_321_z);
    _mav_put_float(buf, 44, g_euler_rates_x);
    _mav_put_float(buf, 48, g_euler_rates_y);
    _mav_put_float(buf, 52, g_euler_rates_z);
    _mav_put_float(buf, 56, reserve_float_1);
    _mav_put_float(buf, 60, reserve_float_2);
    _mav_put_float(buf, 64, reserve_float_3);
    _mav_put_float(buf, 68, reserve_float_4);
    _mav_put_float(buf, 72, reserve_float_5);
    _mav_put_uint16_t(buf, 76, frame_id);
    _mav_put_int8_t(buf, 78, reserve_int8_1);
    _mav_put_int8_t(buf, 79, reserve_int8_2);
    _mav_put_int8_t(buf, 80, reserve_int8_3);
    _mav_put_int8_t(buf, 81, reserve_int8_4);
    _mav_put_int8_t(buf, 82, reserve_int8_5);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FPV_DEBUG_LEN);
#else
    mavlink_fpv_debug_t packet;
    packet.time_unix_usec = time_unix_usec;
    packet.g_body_rate_x = g_body_rate_x;
    packet.g_body_rate_y = g_body_rate_y;
    packet.g_body_rate_z = g_body_rate_z;
    packet.g_frame_angles_312_x = g_frame_angles_312_x;
    packet.g_frame_angles_312_y = g_frame_angles_312_y;
    packet.g_frame_angles_312_z = g_frame_angles_312_z;
    packet.g_euler_angles_321_x = g_euler_angles_321_x;
    packet.g_euler_angles_321_y = g_euler_angles_321_y;
    packet.g_euler_angles_321_z = g_euler_angles_321_z;
    packet.g_euler_rates_x = g_euler_rates_x;
    packet.g_euler_rates_y = g_euler_rates_y;
    packet.g_euler_rates_z = g_euler_rates_z;
    packet.reserve_float_1 = reserve_float_1;
    packet.reserve_float_2 = reserve_float_2;
    packet.reserve_float_3 = reserve_float_3;
    packet.reserve_float_4 = reserve_float_4;
    packet.reserve_float_5 = reserve_float_5;
    packet.frame_id = frame_id;
    packet.reserve_int8_1 = reserve_int8_1;
    packet.reserve_int8_2 = reserve_int8_2;
    packet.reserve_int8_3 = reserve_int8_3;
    packet.reserve_int8_4 = reserve_int8_4;
    packet.reserve_int8_5 = reserve_int8_5;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FPV_DEBUG_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_FPV_DEBUG;
#if MAVLINK_CRC_EXTRA
    return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FPV_DEBUG_MIN_LEN, MAVLINK_MSG_ID_FPV_DEBUG_LEN, MAVLINK_MSG_ID_FPV_DEBUG_CRC);
#else
    return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FPV_DEBUG_MIN_LEN, MAVLINK_MSG_ID_FPV_DEBUG_LEN);
#endif
}

/**
 * @brief Pack a fpv_debug message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param time_unix_usec [us] Timestamp (microseconds, UNIX epoch).
 * @param frame_id  Frame ID (incremental counter for packet loss detection).
 * @param g_body_rate_x [rad/s] Gimbal body angular rate X.
 * @param g_body_rate_y [rad/s] Gimbal body angular rate Y.
 * @param g_body_rate_z [rad/s] Gimbal body angular rate Z.
 * @param g_frame_angles_312_x [rad] Gimbal frame angle X (312 Euler).
 * @param g_frame_angles_312_y [rad] Gimbal frame angle Y (312 Euler).
 * @param g_frame_angles_312_z [rad] Gimbal frame angle Z (312 Euler).
 * @param g_euler_angles_321_x [rad] Inertial Euler angle X (321 Euler).
 * @param g_euler_angles_321_y [rad] Inertial Euler angle Y (321 Euler).
 * @param g_euler_angles_321_z [rad] Inertial Euler angle Z (321 Euler).
 * @param g_euler_rates_x [rad/s] Inertial Euler angular rate X.
 * @param g_euler_rates_y [rad/s] Inertial Euler angular rate Y.
 * @param g_euler_rates_z [rad/s] Inertial Euler angular rate Z.
 * @param reserve_int8_1  Reserved int8 field 1.
 * @param reserve_int8_2  Reserved int8 field 2.
 * @param reserve_int8_3  Reserved int8 field 3.
 * @param reserve_int8_4  Reserved int8 field 4.
 * @param reserve_int8_5  Reserved int8 field 5.
 * @param reserve_float_1  Reserved float field 1.
 * @param reserve_float_2  Reserved float field 2.
 * @param reserve_float_3  Reserved float field 3.
 * @param reserve_float_4  Reserved float field 4.
 * @param reserve_float_5  Reserved float field 5.
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_fpv_debug_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint64_t time_unix_usec,uint16_t frame_id,float g_body_rate_x,float g_body_rate_y,float g_body_rate_z,float g_frame_angles_312_x,float g_frame_angles_312_y,float g_frame_angles_312_z,float g_euler_angles_321_x,float g_euler_angles_321_y,float g_euler_angles_321_z,float g_euler_rates_x,float g_euler_rates_y,float g_euler_rates_z,int8_t reserve_int8_1,int8_t reserve_int8_2,int8_t reserve_int8_3,int8_t reserve_int8_4,int8_t reserve_int8_5,float reserve_float_1,float reserve_float_2,float reserve_float_3,float reserve_float_4,float reserve_float_5)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_FPV_DEBUG_LEN];
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_float(buf, 8, g_body_rate_x);
    _mav_put_float(buf, 12, g_body_rate_y);
    _mav_put_float(buf, 16, g_body_rate_z);
    _mav_put_float(buf, 20, g_frame_angles_312_x);
    _mav_put_float(buf, 24, g_frame_angles_312_y);
    _mav_put_float(buf, 28, g_frame_angles_312_z);
    _mav_put_float(buf, 32, g_euler_angles_321_x);
    _mav_put_float(buf, 36, g_euler_angles_321_y);
    _mav_put_float(buf, 40, g_euler_angles_321_z);
    _mav_put_float(buf, 44, g_euler_rates_x);
    _mav_put_float(buf, 48, g_euler_rates_y);
    _mav_put_float(buf, 52, g_euler_rates_z);
    _mav_put_float(buf, 56, reserve_float_1);
    _mav_put_float(buf, 60, reserve_float_2);
    _mav_put_float(buf, 64, reserve_float_3);
    _mav_put_float(buf, 68, reserve_float_4);
    _mav_put_float(buf, 72, reserve_float_5);
    _mav_put_uint16_t(buf, 76, frame_id);
    _mav_put_int8_t(buf, 78, reserve_int8_1);
    _mav_put_int8_t(buf, 79, reserve_int8_2);
    _mav_put_int8_t(buf, 80, reserve_int8_3);
    _mav_put_int8_t(buf, 81, reserve_int8_4);
    _mav_put_int8_t(buf, 82, reserve_int8_5);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FPV_DEBUG_LEN);
#else
    mavlink_fpv_debug_t packet;
    packet.time_unix_usec = time_unix_usec;
    packet.g_body_rate_x = g_body_rate_x;
    packet.g_body_rate_y = g_body_rate_y;
    packet.g_body_rate_z = g_body_rate_z;
    packet.g_frame_angles_312_x = g_frame_angles_312_x;
    packet.g_frame_angles_312_y = g_frame_angles_312_y;
    packet.g_frame_angles_312_z = g_frame_angles_312_z;
    packet.g_euler_angles_321_x = g_euler_angles_321_x;
    packet.g_euler_angles_321_y = g_euler_angles_321_y;
    packet.g_euler_angles_321_z = g_euler_angles_321_z;
    packet.g_euler_rates_x = g_euler_rates_x;
    packet.g_euler_rates_y = g_euler_rates_y;
    packet.g_euler_rates_z = g_euler_rates_z;
    packet.reserve_float_1 = reserve_float_1;
    packet.reserve_float_2 = reserve_float_2;
    packet.reserve_float_3 = reserve_float_3;
    packet.reserve_float_4 = reserve_float_4;
    packet.reserve_float_5 = reserve_float_5;
    packet.frame_id = frame_id;
    packet.reserve_int8_1 = reserve_int8_1;
    packet.reserve_int8_2 = reserve_int8_2;
    packet.reserve_int8_3 = reserve_int8_3;
    packet.reserve_int8_4 = reserve_int8_4;
    packet.reserve_int8_5 = reserve_int8_5;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FPV_DEBUG_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_FPV_DEBUG;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FPV_DEBUG_MIN_LEN, MAVLINK_MSG_ID_FPV_DEBUG_LEN, MAVLINK_MSG_ID_FPV_DEBUG_CRC);
}

/**
 * @brief Encode a fpv_debug struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param fpv_debug C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_fpv_debug_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_fpv_debug_t* fpv_debug)
{
    return mavlink_msg_fpv_debug_pack(system_id, component_id, msg, fpv_debug->time_unix_usec, fpv_debug->frame_id, fpv_debug->g_body_rate_x, fpv_debug->g_body_rate_y, fpv_debug->g_body_rate_z, fpv_debug->g_frame_angles_312_x, fpv_debug->g_frame_angles_312_y, fpv_debug->g_frame_angles_312_z, fpv_debug->g_euler_angles_321_x, fpv_debug->g_euler_angles_321_y, fpv_debug->g_euler_angles_321_z, fpv_debug->g_euler_rates_x, fpv_debug->g_euler_rates_y, fpv_debug->g_euler_rates_z, fpv_debug->reserve_int8_1, fpv_debug->reserve_int8_2, fpv_debug->reserve_int8_3, fpv_debug->reserve_int8_4, fpv_debug->reserve_int8_5, fpv_debug->reserve_float_1, fpv_debug->reserve_float_2, fpv_debug->reserve_float_3, fpv_debug->reserve_float_4, fpv_debug->reserve_float_5);
}

/**
 * @brief Encode a fpv_debug struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param fpv_debug C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_fpv_debug_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_fpv_debug_t* fpv_debug)
{
    return mavlink_msg_fpv_debug_pack_chan(system_id, component_id, chan, msg, fpv_debug->time_unix_usec, fpv_debug->frame_id, fpv_debug->g_body_rate_x, fpv_debug->g_body_rate_y, fpv_debug->g_body_rate_z, fpv_debug->g_frame_angles_312_x, fpv_debug->g_frame_angles_312_y, fpv_debug->g_frame_angles_312_z, fpv_debug->g_euler_angles_321_x, fpv_debug->g_euler_angles_321_y, fpv_debug->g_euler_angles_321_z, fpv_debug->g_euler_rates_x, fpv_debug->g_euler_rates_y, fpv_debug->g_euler_rates_z, fpv_debug->reserve_int8_1, fpv_debug->reserve_int8_2, fpv_debug->reserve_int8_3, fpv_debug->reserve_int8_4, fpv_debug->reserve_int8_5, fpv_debug->reserve_float_1, fpv_debug->reserve_float_2, fpv_debug->reserve_float_3, fpv_debug->reserve_float_4, fpv_debug->reserve_float_5);
}

/**
 * @brief Encode a fpv_debug struct with provided status structure
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param status MAVLink status structure
 * @param msg The MAVLink message to compress the data into
 * @param fpv_debug C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_fpv_debug_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_fpv_debug_t* fpv_debug)
{
    return mavlink_msg_fpv_debug_pack_status(system_id, component_id, _status, msg,  fpv_debug->time_unix_usec, fpv_debug->frame_id, fpv_debug->g_body_rate_x, fpv_debug->g_body_rate_y, fpv_debug->g_body_rate_z, fpv_debug->g_frame_angles_312_x, fpv_debug->g_frame_angles_312_y, fpv_debug->g_frame_angles_312_z, fpv_debug->g_euler_angles_321_x, fpv_debug->g_euler_angles_321_y, fpv_debug->g_euler_angles_321_z, fpv_debug->g_euler_rates_x, fpv_debug->g_euler_rates_y, fpv_debug->g_euler_rates_z, fpv_debug->reserve_int8_1, fpv_debug->reserve_int8_2, fpv_debug->reserve_int8_3, fpv_debug->reserve_int8_4, fpv_debug->reserve_int8_5, fpv_debug->reserve_float_1, fpv_debug->reserve_float_2, fpv_debug->reserve_float_3, fpv_debug->reserve_float_4, fpv_debug->reserve_float_5);
}

/**
 * @brief Send a fpv_debug message
 * @param chan MAVLink channel to send the message
 *
 * @param time_unix_usec [us] Timestamp (microseconds, UNIX epoch).
 * @param frame_id  Frame ID (incremental counter for packet loss detection).
 * @param g_body_rate_x [rad/s] Gimbal body angular rate X.
 * @param g_body_rate_y [rad/s] Gimbal body angular rate Y.
 * @param g_body_rate_z [rad/s] Gimbal body angular rate Z.
 * @param g_frame_angles_312_x [rad] Gimbal frame angle X (312 Euler).
 * @param g_frame_angles_312_y [rad] Gimbal frame angle Y (312 Euler).
 * @param g_frame_angles_312_z [rad] Gimbal frame angle Z (312 Euler).
 * @param g_euler_angles_321_x [rad] Inertial Euler angle X (321 Euler).
 * @param g_euler_angles_321_y [rad] Inertial Euler angle Y (321 Euler).
 * @param g_euler_angles_321_z [rad] Inertial Euler angle Z (321 Euler).
 * @param g_euler_rates_x [rad/s] Inertial Euler angular rate X.
 * @param g_euler_rates_y [rad/s] Inertial Euler angular rate Y.
 * @param g_euler_rates_z [rad/s] Inertial Euler angular rate Z.
 * @param reserve_int8_1  Reserved int8 field 1.
 * @param reserve_int8_2  Reserved int8 field 2.
 * @param reserve_int8_3  Reserved int8 field 3.
 * @param reserve_int8_4  Reserved int8 field 4.
 * @param reserve_int8_5  Reserved int8 field 5.
 * @param reserve_float_1  Reserved float field 1.
 * @param reserve_float_2  Reserved float field 2.
 * @param reserve_float_3  Reserved float field 3.
 * @param reserve_float_4  Reserved float field 4.
 * @param reserve_float_5  Reserved float field 5.
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_fpv_debug_send(mavlink_channel_t chan, uint64_t time_unix_usec, uint16_t frame_id, float g_body_rate_x, float g_body_rate_y, float g_body_rate_z, float g_frame_angles_312_x, float g_frame_angles_312_y, float g_frame_angles_312_z, float g_euler_angles_321_x, float g_euler_angles_321_y, float g_euler_angles_321_z, float g_euler_rates_x, float g_euler_rates_y, float g_euler_rates_z, int8_t reserve_int8_1, int8_t reserve_int8_2, int8_t reserve_int8_3, int8_t reserve_int8_4, int8_t reserve_int8_5, float reserve_float_1, float reserve_float_2, float reserve_float_3, float reserve_float_4, float reserve_float_5)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_FPV_DEBUG_LEN];
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_float(buf, 8, g_body_rate_x);
    _mav_put_float(buf, 12, g_body_rate_y);
    _mav_put_float(buf, 16, g_body_rate_z);
    _mav_put_float(buf, 20, g_frame_angles_312_x);
    _mav_put_float(buf, 24, g_frame_angles_312_y);
    _mav_put_float(buf, 28, g_frame_angles_312_z);
    _mav_put_float(buf, 32, g_euler_angles_321_x);
    _mav_put_float(buf, 36, g_euler_angles_321_y);
    _mav_put_float(buf, 40, g_euler_angles_321_z);
    _mav_put_float(buf, 44, g_euler_rates_x);
    _mav_put_float(buf, 48, g_euler_rates_y);
    _mav_put_float(buf, 52, g_euler_rates_z);
    _mav_put_float(buf, 56, reserve_float_1);
    _mav_put_float(buf, 60, reserve_float_2);
    _mav_put_float(buf, 64, reserve_float_3);
    _mav_put_float(buf, 68, reserve_float_4);
    _mav_put_float(buf, 72, reserve_float_5);
    _mav_put_uint16_t(buf, 76, frame_id);
    _mav_put_int8_t(buf, 78, reserve_int8_1);
    _mav_put_int8_t(buf, 79, reserve_int8_2);
    _mav_put_int8_t(buf, 80, reserve_int8_3);
    _mav_put_int8_t(buf, 81, reserve_int8_4);
    _mav_put_int8_t(buf, 82, reserve_int8_5);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FPV_DEBUG, buf, MAVLINK_MSG_ID_FPV_DEBUG_MIN_LEN, MAVLINK_MSG_ID_FPV_DEBUG_LEN, MAVLINK_MSG_ID_FPV_DEBUG_CRC);
#else
    mavlink_fpv_debug_t packet;
    packet.time_unix_usec = time_unix_usec;
    packet.g_body_rate_x = g_body_rate_x;
    packet.g_body_rate_y = g_body_rate_y;
    packet.g_body_rate_z = g_body_rate_z;
    packet.g_frame_angles_312_x = g_frame_angles_312_x;
    packet.g_frame_angles_312_y = g_frame_angles_312_y;
    packet.g_frame_angles_312_z = g_frame_angles_312_z;
    packet.g_euler_angles_321_x = g_euler_angles_321_x;
    packet.g_euler_angles_321_y = g_euler_angles_321_y;
    packet.g_euler_angles_321_z = g_euler_angles_321_z;
    packet.g_euler_rates_x = g_euler_rates_x;
    packet.g_euler_rates_y = g_euler_rates_y;
    packet.g_euler_rates_z = g_euler_rates_z;
    packet.reserve_float_1 = reserve_float_1;
    packet.reserve_float_2 = reserve_float_2;
    packet.reserve_float_3 = reserve_float_3;
    packet.reserve_float_4 = reserve_float_4;
    packet.reserve_float_5 = reserve_float_5;
    packet.frame_id = frame_id;
    packet.reserve_int8_1 = reserve_int8_1;
    packet.reserve_int8_2 = reserve_int8_2;
    packet.reserve_int8_3 = reserve_int8_3;
    packet.reserve_int8_4 = reserve_int8_4;
    packet.reserve_int8_5 = reserve_int8_5;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FPV_DEBUG, (const char *)&packet, MAVLINK_MSG_ID_FPV_DEBUG_MIN_LEN, MAVLINK_MSG_ID_FPV_DEBUG_LEN, MAVLINK_MSG_ID_FPV_DEBUG_CRC);
#endif
}

/**
 * @brief Send a fpv_debug message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_fpv_debug_send_struct(mavlink_channel_t chan, const mavlink_fpv_debug_t* fpv_debug)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_fpv_debug_send(chan, fpv_debug->time_unix_usec, fpv_debug->frame_id, fpv_debug->g_body_rate_x, fpv_debug->g_body_rate_y, fpv_debug->g_body_rate_z, fpv_debug->g_frame_angles_312_x, fpv_debug->g_frame_angles_312_y, fpv_debug->g_frame_angles_312_z, fpv_debug->g_euler_angles_321_x, fpv_debug->g_euler_angles_321_y, fpv_debug->g_euler_angles_321_z, fpv_debug->g_euler_rates_x, fpv_debug->g_euler_rates_y, fpv_debug->g_euler_rates_z, fpv_debug->reserve_int8_1, fpv_debug->reserve_int8_2, fpv_debug->reserve_int8_3, fpv_debug->reserve_int8_4, fpv_debug->reserve_int8_5, fpv_debug->reserve_float_1, fpv_debug->reserve_float_2, fpv_debug->reserve_float_3, fpv_debug->reserve_float_4, fpv_debug->reserve_float_5);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FPV_DEBUG, (const char *)fpv_debug, MAVLINK_MSG_ID_FPV_DEBUG_MIN_LEN, MAVLINK_MSG_ID_FPV_DEBUG_LEN, MAVLINK_MSG_ID_FPV_DEBUG_CRC);
#endif
}

#if MAVLINK_MSG_ID_FPV_DEBUG_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This variant of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_fpv_debug_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint64_t time_unix_usec, uint16_t frame_id, float g_body_rate_x, float g_body_rate_y, float g_body_rate_z, float g_frame_angles_312_x, float g_frame_angles_312_y, float g_frame_angles_312_z, float g_euler_angles_321_x, float g_euler_angles_321_y, float g_euler_angles_321_z, float g_euler_rates_x, float g_euler_rates_y, float g_euler_rates_z, int8_t reserve_int8_1, int8_t reserve_int8_2, int8_t reserve_int8_3, int8_t reserve_int8_4, int8_t reserve_int8_5, float reserve_float_1, float reserve_float_2, float reserve_float_3, float reserve_float_4, float reserve_float_5)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_float(buf, 8, g_body_rate_x);
    _mav_put_float(buf, 12, g_body_rate_y);
    _mav_put_float(buf, 16, g_body_rate_z);
    _mav_put_float(buf, 20, g_frame_angles_312_x);
    _mav_put_float(buf, 24, g_frame_angles_312_y);
    _mav_put_float(buf, 28, g_frame_angles_312_z);
    _mav_put_float(buf, 32, g_euler_angles_321_x);
    _mav_put_float(buf, 36, g_euler_angles_321_y);
    _mav_put_float(buf, 40, g_euler_angles_321_z);
    _mav_put_float(buf, 44, g_euler_rates_x);
    _mav_put_float(buf, 48, g_euler_rates_y);
    _mav_put_float(buf, 52, g_euler_rates_z);
    _mav_put_float(buf, 56, reserve_float_1);
    _mav_put_float(buf, 60, reserve_float_2);
    _mav_put_float(buf, 64, reserve_float_3);
    _mav_put_float(buf, 68, reserve_float_4);
    _mav_put_float(buf, 72, reserve_float_5);
    _mav_put_uint16_t(buf, 76, frame_id);
    _mav_put_int8_t(buf, 78, reserve_int8_1);
    _mav_put_int8_t(buf, 79, reserve_int8_2);
    _mav_put_int8_t(buf, 80, reserve_int8_3);
    _mav_put_int8_t(buf, 81, reserve_int8_4);
    _mav_put_int8_t(buf, 82, reserve_int8_5);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FPV_DEBUG, buf, MAVLINK_MSG_ID_FPV_DEBUG_MIN_LEN, MAVLINK_MSG_ID_FPV_DEBUG_LEN, MAVLINK_MSG_ID_FPV_DEBUG_CRC);
#else
    mavlink_fpv_debug_t *packet = (mavlink_fpv_debug_t *)msgbuf;
    packet->time_unix_usec = time_unix_usec;
    packet->g_body_rate_x = g_body_rate_x;
    packet->g_body_rate_y = g_body_rate_y;
    packet->g_body_rate_z = g_body_rate_z;
    packet->g_frame_angles_312_x = g_frame_angles_312_x;
    packet->g_frame_angles_312_y = g_frame_angles_312_y;
    packet->g_frame_angles_312_z = g_frame_angles_312_z;
    packet->g_euler_angles_321_x = g_euler_angles_321_x;
    packet->g_euler_angles_321_y = g_euler_angles_321_y;
    packet->g_euler_angles_321_z = g_euler_angles_321_z;
    packet->g_euler_rates_x = g_euler_rates_x;
    packet->g_euler_rates_y = g_euler_rates_y;
    packet->g_euler_rates_z = g_euler_rates_z;
    packet->reserve_float_1 = reserve_float_1;
    packet->reserve_float_2 = reserve_float_2;
    packet->reserve_float_3 = reserve_float_3;
    packet->reserve_float_4 = reserve_float_4;
    packet->reserve_float_5 = reserve_float_5;
    packet->frame_id = frame_id;
    packet->reserve_int8_1 = reserve_int8_1;
    packet->reserve_int8_2 = reserve_int8_2;
    packet->reserve_int8_3 = reserve_int8_3;
    packet->reserve_int8_4 = reserve_int8_4;
    packet->reserve_int8_5 = reserve_int8_5;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FPV_DEBUG, (const char *)packet, MAVLINK_MSG_ID_FPV_DEBUG_MIN_LEN, MAVLINK_MSG_ID_FPV_DEBUG_LEN, MAVLINK_MSG_ID_FPV_DEBUG_CRC);
#endif
}
#endif

#endif

// MESSAGE FPV_DEBUG UNPACKING


/**
 * @brief Get field time_unix_usec from fpv_debug message
 *
 * @return [us] Timestamp (microseconds, UNIX epoch).
 */
static inline uint64_t mavlink_msg_fpv_debug_get_time_unix_usec(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint64_t(msg,  0);
}

/**
 * @brief Get field frame_id from fpv_debug message
 *
 * @return  Frame ID (incremental counter for packet loss detection).
 */
static inline uint16_t mavlink_msg_fpv_debug_get_frame_id(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  76);
}

/**
 * @brief Get field g_body_rate_x from fpv_debug message
 *
 * @return [rad/s] Gimbal body angular rate X.
 */
static inline float mavlink_msg_fpv_debug_get_g_body_rate_x(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  8);
}

/**
 * @brief Get field g_body_rate_y from fpv_debug message
 *
 * @return [rad/s] Gimbal body angular rate Y.
 */
static inline float mavlink_msg_fpv_debug_get_g_body_rate_y(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  12);
}

/**
 * @brief Get field g_body_rate_z from fpv_debug message
 *
 * @return [rad/s] Gimbal body angular rate Z.
 */
static inline float mavlink_msg_fpv_debug_get_g_body_rate_z(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  16);
}

/**
 * @brief Get field g_frame_angles_312_x from fpv_debug message
 *
 * @return [rad] Gimbal frame angle X (312 Euler).
 */
static inline float mavlink_msg_fpv_debug_get_g_frame_angles_312_x(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  20);
}

/**
 * @brief Get field g_frame_angles_312_y from fpv_debug message
 *
 * @return [rad] Gimbal frame angle Y (312 Euler).
 */
static inline float mavlink_msg_fpv_debug_get_g_frame_angles_312_y(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  24);
}

/**
 * @brief Get field g_frame_angles_312_z from fpv_debug message
 *
 * @return [rad] Gimbal frame angle Z (312 Euler).
 */
static inline float mavlink_msg_fpv_debug_get_g_frame_angles_312_z(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  28);
}

/**
 * @brief Get field g_euler_angles_321_x from fpv_debug message
 *
 * @return [rad] Inertial Euler angle X (321 Euler).
 */
static inline float mavlink_msg_fpv_debug_get_g_euler_angles_321_x(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  32);
}

/**
 * @brief Get field g_euler_angles_321_y from fpv_debug message
 *
 * @return [rad] Inertial Euler angle Y (321 Euler).
 */
static inline float mavlink_msg_fpv_debug_get_g_euler_angles_321_y(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  36);
}

/**
 * @brief Get field g_euler_angles_321_z from fpv_debug message
 *
 * @return [rad] Inertial Euler angle Z (321 Euler).
 */
static inline float mavlink_msg_fpv_debug_get_g_euler_angles_321_z(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  40);
}

/**
 * @brief Get field g_euler_rates_x from fpv_debug message
 *
 * @return [rad/s] Inertial Euler angular rate X.
 */
static inline float mavlink_msg_fpv_debug_get_g_euler_rates_x(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  44);
}

/**
 * @brief Get field g_euler_rates_y from fpv_debug message
 *
 * @return [rad/s] Inertial Euler angular rate Y.
 */
static inline float mavlink_msg_fpv_debug_get_g_euler_rates_y(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  48);
}

/**
 * @brief Get field g_euler_rates_z from fpv_debug message
 *
 * @return [rad/s] Inertial Euler angular rate Z.
 */
static inline float mavlink_msg_fpv_debug_get_g_euler_rates_z(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  52);
}

/**
 * @brief Get field reserve_int8_1 from fpv_debug message
 *
 * @return  Reserved int8 field 1.
 */
static inline int8_t mavlink_msg_fpv_debug_get_reserve_int8_1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int8_t(msg,  78);
}

/**
 * @brief Get field reserve_int8_2 from fpv_debug message
 *
 * @return  Reserved int8 field 2.
 */
static inline int8_t mavlink_msg_fpv_debug_get_reserve_int8_2(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int8_t(msg,  79);
}

/**
 * @brief Get field reserve_int8_3 from fpv_debug message
 *
 * @return  Reserved int8 field 3.
 */
static inline int8_t mavlink_msg_fpv_debug_get_reserve_int8_3(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int8_t(msg,  80);
}

/**
 * @brief Get field reserve_int8_4 from fpv_debug message
 *
 * @return  Reserved int8 field 4.
 */
static inline int8_t mavlink_msg_fpv_debug_get_reserve_int8_4(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int8_t(msg,  81);
}

/**
 * @brief Get field reserve_int8_5 from fpv_debug message
 *
 * @return  Reserved int8 field 5.
 */
static inline int8_t mavlink_msg_fpv_debug_get_reserve_int8_5(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int8_t(msg,  82);
}

/**
 * @brief Get field reserve_float_1 from fpv_debug message
 *
 * @return  Reserved float field 1.
 */
static inline float mavlink_msg_fpv_debug_get_reserve_float_1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  56);
}

/**
 * @brief Get field reserve_float_2 from fpv_debug message
 *
 * @return  Reserved float field 2.
 */
static inline float mavlink_msg_fpv_debug_get_reserve_float_2(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  60);
}

/**
 * @brief Get field reserve_float_3 from fpv_debug message
 *
 * @return  Reserved float field 3.
 */
static inline float mavlink_msg_fpv_debug_get_reserve_float_3(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  64);
}

/**
 * @brief Get field reserve_float_4 from fpv_debug message
 *
 * @return  Reserved float field 4.
 */
static inline float mavlink_msg_fpv_debug_get_reserve_float_4(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  68);
}

/**
 * @brief Get field reserve_float_5 from fpv_debug message
 *
 * @return  Reserved float field 5.
 */
static inline float mavlink_msg_fpv_debug_get_reserve_float_5(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  72);
}

/**
 * @brief Decode a fpv_debug message into a struct
 *
 * @param msg The message to decode
 * @param fpv_debug C-struct to decode the message contents into
 */
static inline void mavlink_msg_fpv_debug_decode(const mavlink_message_t* msg, mavlink_fpv_debug_t* fpv_debug)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    fpv_debug->time_unix_usec = mavlink_msg_fpv_debug_get_time_unix_usec(msg);
    fpv_debug->g_body_rate_x = mavlink_msg_fpv_debug_get_g_body_rate_x(msg);
    fpv_debug->g_body_rate_y = mavlink_msg_fpv_debug_get_g_body_rate_y(msg);
    fpv_debug->g_body_rate_z = mavlink_msg_fpv_debug_get_g_body_rate_z(msg);
    fpv_debug->g_frame_angles_312_x = mavlink_msg_fpv_debug_get_g_frame_angles_312_x(msg);
    fpv_debug->g_frame_angles_312_y = mavlink_msg_fpv_debug_get_g_frame_angles_312_y(msg);
    fpv_debug->g_frame_angles_312_z = mavlink_msg_fpv_debug_get_g_frame_angles_312_z(msg);
    fpv_debug->g_euler_angles_321_x = mavlink_msg_fpv_debug_get_g_euler_angles_321_x(msg);
    fpv_debug->g_euler_angles_321_y = mavlink_msg_fpv_debug_get_g_euler_angles_321_y(msg);
    fpv_debug->g_euler_angles_321_z = mavlink_msg_fpv_debug_get_g_euler_angles_321_z(msg);
    fpv_debug->g_euler_rates_x = mavlink_msg_fpv_debug_get_g_euler_rates_x(msg);
    fpv_debug->g_euler_rates_y = mavlink_msg_fpv_debug_get_g_euler_rates_y(msg);
    fpv_debug->g_euler_rates_z = mavlink_msg_fpv_debug_get_g_euler_rates_z(msg);
    fpv_debug->reserve_float_1 = mavlink_msg_fpv_debug_get_reserve_float_1(msg);
    fpv_debug->reserve_float_2 = mavlink_msg_fpv_debug_get_reserve_float_2(msg);
    fpv_debug->reserve_float_3 = mavlink_msg_fpv_debug_get_reserve_float_3(msg);
    fpv_debug->reserve_float_4 = mavlink_msg_fpv_debug_get_reserve_float_4(msg);
    fpv_debug->reserve_float_5 = mavlink_msg_fpv_debug_get_reserve_float_5(msg);
    fpv_debug->frame_id = mavlink_msg_fpv_debug_get_frame_id(msg);
    fpv_debug->reserve_int8_1 = mavlink_msg_fpv_debug_get_reserve_int8_1(msg);
    fpv_debug->reserve_int8_2 = mavlink_msg_fpv_debug_get_reserve_int8_2(msg);
    fpv_debug->reserve_int8_3 = mavlink_msg_fpv_debug_get_reserve_int8_3(msg);
    fpv_debug->reserve_int8_4 = mavlink_msg_fpv_debug_get_reserve_int8_4(msg);
    fpv_debug->reserve_int8_5 = mavlink_msg_fpv_debug_get_reserve_int8_5(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_FPV_DEBUG_LEN? msg->len : MAVLINK_MSG_ID_FPV_DEBUG_LEN;
        memset(fpv_debug, 0, MAVLINK_MSG_ID_FPV_DEBUG_LEN);
    memcpy(fpv_debug, _MAV_PAYLOAD(msg), len);
#endif
}
